<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
        <div class="center_box">
        	<div class="center_box_nav center_context_nav">
            	<div class="center_banner">
                	<a href="javascript:location.href='${ctx}/front!viewIndex.action';" title="首页">首页</a>&gt;&nbsp;文章&gt;&nbsp;<a href="javascript:location.href='${ctx}/front!viewContextList.action?classId=${data.classId}';"><c:if test="${'A000'==data.classId}">营养</c:if><c:if test="${'B000'==data.classId}">扮靓</c:if><c:if test="${'C000'==data.classId}">用品</c:if><c:if test="${'D000'==data.classId}">娱乐</c:if>资讯</a>
                </div>
             </div>
            <div class="clearfix">
            	<div class="context_list_show context_detail">
                	<div class="context_header">
                    	<h1>${data.msgTitle}</h1>
                        <p class="context_publis_time">发表于&nbsp;<fmt:formatDate value="${data.createTime}" pattern="yyyy-MM-dd HH:mm"/>&nbsp;&nbsp;&nbsp;浏览&nbsp;${data.countLook}&nbsp;次</p>
                    </div>
                	<div class="context_dt_desc">                    	
                    	<p><c:if test="${data.msgPic!=null}"><center><img width="400" height="350" src="${ctx}/frontSys!getPic.action?name=${data.msgPic}" /></center></c:if></p><br/>
                        <p>${data.msgContent}</p>                        
                    </div>
                    <div class="context_more_ct">
                    	<h2>相关阅读：</h2>
                        <ol>
                        	<c:forEach var="o" items="${aboutData}">
                        	<li>
                            	<a href="javascript:location.href='${ctx}/front!viewContextDetail.action?msgId=${o.msgId}';">${o.msgTitle}</a>
                                <span class="context_time"><fmt:formatDate value="${o.createTime}" pattern="yyyy-MM-dd HH:mm"/></span>
                            </li>
                        	</c:forEach>    
                        </ol>                        
                    </div>                
                    <div style="margin: 20px">
						<span class="float_lf">分享到：</span>
						<div class="jiathis_style_24x24">
							<a class="jiathis_button_qzone"></a>
							<a class="jiathis_button_tsina"></a>
							<a class="jiathis_button_tqq"></a>
							<a class="jiathis_button_renren"></a>
							<a class="jiathis_button_kaixin001"></a>
							<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
						</div>
						<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1350895199037564" charset="utf-8"></script>
					</div>
                </div>

              	<div class="context_rank_box">
                    <div class="context_inner clearfix">
                    	<h2>猜你喜欢</h2>
                        <div class="context_titles">
                        	<ul class="context_guess" id='guessContent'>	
                            </ul>
                            <div class="list_page">
                                <div class="list_page_inner">
                                    <a href="javascript:doGuessQuery();" class="page_pre"></a>
                                    <a href="javascript:doGuessQuery();" class="page_next"></a>
                                </div>  
                    		</div>
                        </div>
                    </div>
                </div>                
            </div>	
        </div>
<script type="text/javascript">
<!--
//查询猜你喜欢列表
function doGuessQuery(){	
	var url="${ctx}/front!getGuessList.action";
	$.post(url, "num=5" ,function callback(txt){   
			var json = $.parseJSON(txt);
			if (json.code==0) {
				createGuessNotes(json.info);				
			}else{
				alert('查询猜你喜欢列表失败！');
			}
		}	
	);
}
//创建猜你喜欢数据
function createGuessNotes(objs){		
	var c='';
	for(var i=0;i<objs.length;i++){
		var obj=objs[i];
		c+='<li>'; 
		c+='<a href="javascript:goDetail(\''+obj.goodsId+'\');" class="context_pic"><img src="'+obj.goodsPic+'" alt="'+obj.goodsName+'" width="152" height="160" /></a>';
		c+='<a href="javascript:goDetail(\''+obj.goodsId+'\');" class="context_title">'+obj.goodsName+'</a>';
		c+='</li>';
	}
	$('#guessContent').html(c);
}
//-->
</script>
